#ifndef __XL430W250_H
#define __XL430W250_H

#include "stdio.h"	
#include <stdbool.h>
#include <stdint.h>
#include "oslib.h"


void SteerInit(void);
void Run(void);
void Stop(void);
void Right(void);
void Left(void);
void Back(void);
void Led(int times);
void TrqEn(bool TrqStatue);
void ReadPos(void);
//void SetOpMode(u8 OpMode);
//void SetDir(u8 Dir);
//void SetVel(s16 Vel);
//void ReadMes(void);
//u16 update_crc(u16 crc_accum, u8 *data_blk_ptr, u16 data_blk_size);
void Servo_Torque(uint8_t id, bool TrqState);
void Servo_Goal_Position(uint8_t id, uint32_t pos);

void Usart2Receive_IDLE(UART_HandleTypeDef *huart);
extern uint8_t usart2_rx_flag;
#define USART2_BUFFER_SIZE 32
extern unsigned char usart2_rxbuff[USART2_BUFFER_SIZE];
void usart2_init();


#endif
